using System;
using System.ComponentModel;
using System.Collections;
using System.Diagnostics;
using System.Data;
using System.Data.SqlClient;
using System.Xml;
using System.Reflection;
using Microsoft.Win32;
using System.IO;
using Srvtools;
using System.Security;
using System.Security.Permissions;
using System.Threading;

namespace sRepSql
{
    /// <summary>
    /// Summary description for Component.
    /// </summary>
    public class Component : DataModule
    {
        private ServiceManager serviceManager;
        private InfoCommand rBAS001;
        private InfoConnection infoConnection;
        private InfoCommand rBAS002;
        private InfoCommand rGSO001;
        private InfoCommand rPPO001;
        private InfoCommand rLIM001;
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components;

        public Component(System.ComponentModel.IContainer container)
        {
            ///
            /// Required for Windows.Forms Class Composition Designer support
            ///
            container.Add(this);
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        public Component()
        {
            ///
            /// This call is required by the Windows.Forms Designer.
            ///
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        /// <summary> 
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Component));
            Srvtools.KeyItem keyItem1 = new Srvtools.KeyItem();
            this.rBAS001 = new Srvtools.InfoCommand(this.components);
            this.infoConnection = new Srvtools.InfoConnection();
            this.serviceManager = new Srvtools.ServiceManager(this.components);
            this.rBAS002 = new Srvtools.InfoCommand(this.components);
            this.rGSO001 = new Srvtools.InfoCommand(this.components);
            this.rPPO001 = new Srvtools.InfoCommand(this.components);
            this.rLIM001 = new Srvtools.InfoCommand(this.components);
            ((System.ComponentModel.ISupportInitialize)(this.rBAS001)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.infoConnection)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.rBAS002)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.rGSO001)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.rPPO001)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.rLIM001)).BeginInit();
            // 
            // rBAS001
            // 
            this.rBAS001.CommandText = "SELECT TOP 10 B_CUST.NM_CUST, SUM(AM_TOTAL) AS AM_TOTAL\r\n  FROM GSM_SHIP_M\r\n  LEF" +
                "T JOIN B_CUST ON B_CUST.ID_CUST = GSM_SHIP_M.ID_CUST \r\n GROUP BY NM_CUST\r\n ORDER" +
                " BY AM_TOTAL DESC";
            this.rBAS001.CommandTimeout = 30;
            this.rBAS001.CommandType = System.Data.CommandType.Text;
            this.rBAS001.EEPAlias = null;
            this.rBAS001.InfoConnection = this.infoConnection;
            this.rBAS001.Name = "rBAS001";
            this.rBAS001.NotificationAutoEnlist = false;
            this.rBAS001.SecExcept = null;
            this.rBAS001.SecFieldName = "";
            this.rBAS001.SecStyle = Srvtools.SecurityStyle.ssByNone;
            this.rBAS001.SelectTop = 0;
            this.rBAS001.SiteControl = false;
            this.rBAS001.SiteFieldName = "";
            this.rBAS001.Transaction = null;
            this.rBAS001.UpdatedRowSource = System.Data.UpdateRowSource.Both;
            // 
            // infoConnection
            // 
            this.infoConnection.ConnectionType = Srvtools.ConnectionType.SqlClient;
            this.infoConnection.EEPAlias = "ERPS";
            // 
            // rBAS002
            // 
            this.rBAS002.CommandText = "SELECT TOP 10 B_VEND.NM_VEND, SUM(AM_TOTAL) AS AM_TOTAL\r\n  FROM PIQ_PUR_M\r\n  LEFT" +
                " JOIN B_VEND ON B_VEND.ID_VEND = PIQ_PUR_M.ID_VEND \r\n GROUP BY NM_VEND\r\n ORDER B" +
                "Y AM_TOTAL DESC";
            this.rBAS002.CommandTimeout = 30;
            this.rBAS002.CommandType = System.Data.CommandType.Text;
            this.rBAS002.EEPAlias = null;
            this.rBAS002.InfoConnection = this.infoConnection;
            this.rBAS002.Name = "rBAS002";
            this.rBAS002.NotificationAutoEnlist = false;
            this.rBAS002.SecExcept = null;
            this.rBAS002.SecFieldName = null;
            this.rBAS002.SecStyle = Srvtools.SecurityStyle.ssByNone;
            this.rBAS002.SelectTop = 0;
            this.rBAS002.SiteControl = false;
            this.rBAS002.SiteFieldName = null;
            this.rBAS002.Transaction = null;
            this.rBAS002.UpdatedRowSource = System.Data.UpdateRowSource.Both;
            // 
            // rGSO001
            // 
            this.rGSO001.CommandText = "SELECT GSO_ORD_M.*, GSO_ORD_D.*, GSO_ORD_D.QT_QTY-GSO_ORD_D.QT_SHIP_END AS QT_BAN" +
                "LANCE FROM GSO_ORD_M\r\nLEFT JOIN GSO_ORD_D ON GSO_ORD_M.NO_ORDER=GSO_ORD_D.NO_ORD" +
                "ER \r\n";
            this.rGSO001.CommandTimeout = 30;
            this.rGSO001.CommandType = System.Data.CommandType.Text;
            this.rGSO001.EEPAlias = null;
            this.rGSO001.InfoConnection = this.infoConnection;
            this.rGSO001.Name = "rGSO001";
            this.rGSO001.NotificationAutoEnlist = false;
            this.rGSO001.SecExcept = null;
            this.rGSO001.SecFieldName = null;
            this.rGSO001.SecStyle = Srvtools.SecurityStyle.ssByNone;
            this.rGSO001.SelectTop = 0;
            this.rGSO001.SiteControl = false;
            this.rGSO001.SiteFieldName = null;
            this.rGSO001.Transaction = null;
            this.rGSO001.UpdatedRowSource = System.Data.UpdateRowSource.Both;
            // 
            // rPPO001
            // 
            this.rPPO001.CommandText = resources.GetString("rPPO001.CommandText");
            this.rPPO001.CommandTimeout = 30;
            this.rPPO001.CommandType = System.Data.CommandType.Text;
            this.rPPO001.EEPAlias = null;
            this.rPPO001.InfoConnection = this.infoConnection;
            keyItem1.KeyName = "NO_PO";
            this.rPPO001.KeyFields.Add(keyItem1);
            this.rPPO001.Name = "rPPO001";
            this.rPPO001.NotificationAutoEnlist = false;
            this.rPPO001.SecExcept = null;
            this.rPPO001.SecFieldName = null;
            this.rPPO001.SecStyle = Srvtools.SecurityStyle.ssByNone;
            this.rPPO001.SelectTop = 0;
            this.rPPO001.SiteControl = false;
            this.rPPO001.SiteFieldName = null;
            this.rPPO001.Transaction = null;
            this.rPPO001.UpdatedRowSource = System.Data.UpdateRowSource.Both;
            // 
            // rLIM001
            // 
            this.rLIM001.CommandText = resources.GetString("rLIM001.CommandText");
            this.rLIM001.CommandTimeout = 30;
            this.rLIM001.CommandType = System.Data.CommandType.Text;
            this.rLIM001.EEPAlias = null;
            this.rLIM001.InfoConnection = this.infoConnection;
            this.rLIM001.Name = "rLIM001";
            this.rLIM001.NotificationAutoEnlist = false;
            this.rLIM001.SecExcept = null;
            this.rLIM001.SecFieldName = null;
            this.rLIM001.SecStyle = Srvtools.SecurityStyle.ssByNone;
            this.rLIM001.SelectTop = 0;
            this.rLIM001.SiteControl = false;
            this.rLIM001.SiteFieldName = null;
            this.rLIM001.Transaction = null;
            this.rLIM001.UpdatedRowSource = System.Data.UpdateRowSource.Both;
            ((System.ComponentModel.ISupportInitialize)(this.rBAS001)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.infoConnection)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.rBAS002)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.rGSO001)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.rPPO001)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.rLIM001)).EndInit();

        }

        #endregion
    }
}
